﻿






<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 数据表格</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="css/dataTables.bootstrap.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="css/sweetalert.css" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>部门列表</h5>
                        <div class="ibox-tools">
                            </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                	<th>Id</th>
                                    <th>权限名称</th>
                                    <th>权限类型</th>
                                    <th style="width:200px;">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            	
                                <tr class="gradeX">
                                	<input id="1" type="hidden" value="10" />
                                    <td>1</td>
                                    <td>总管理员</td>
                                    <td>
                                    	总管理员
                                    </td>
                                    <td class="center"  style="padding: 6px;">
                                    <a href="tianjiaquanxian.html">
                                    <button class="btn  btn-info" style="margin-bottom: 0px;padding: 0px 12px;">编辑/查看</button>
                                    </a>
                                    <input type="hidden" value="10"/>
                                    <button  class="btn btn-info delete" onclick="del('10')" style="margin-bottom: 0px;padding: 0px 12px;">删除</button>
                                    </td>
                                </tr>
                                
                                <tr class="gradeX">
                                	<input id="2" type="hidden" value="2" />
                                    <td>2</td>
                                    <td>财务部门</td>
                                    <td>
                                        财务部门
                                    </td>
                                    <td class="center"  style="padding: 6px;">
                                    <a href="tianjiaquanxian.html">
                                    <button class="btn  btn-info" style="margin-bottom: 0px;padding: 0px 12px;">编辑/查看</button>
                                    </a>
                                    <input type="hidden" value="9"/>
                                    <button  class="btn btn-info delete" onclick="del('9')" style="margin-bottom: 0px;padding: 0px 12px;">删除</button>
                                    </td>
                                </tr>
                                
                                <tr class="gradeX">
                                	<input id="3" type="hidden" value="3" />
                                    <td>3</td>
                                    <td>美工</td>
                                    <td>
                                    	
                                    	
                                        
                                        美工
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                    <td class="center"  style="padding: 6px;">
                                    <a href="tianjiaquanxian.html">
                                    <button class="btn  btn-info" style="margin-bottom: 0px;padding: 0px 12px;">编辑/查看</button>
                                    </a>
                                    <input type="hidden" value="8"/>
                                    <button  class="btn btn-info delete" onclick="del('8')" style="margin-bottom: 0px;padding: 0px 12px;">删除</button>
                                    </td>
                                </tr>
                                
                                <tr class="gradeX">
                                	<input id="4" type="hidden" value="4" />
                                    <td>4</td>
                                    <td>发货部门</td>
                                    <td>
                                    	
                                    	
                                        发货部门
                                        
                                        
                                        
                                        
                                        
                                        
                                    </td>
                                    <td class="center"  style="padding: 6px;">
                                    <a href="tianjiaquanxian.html">
                                    <button class="btn  btn-info" style="margin-bottom: 0px;padding: 0px 12px;">编辑/查看</button>
                                    </a>
                                    <input type="hidden" value="7"/>
                                    <button  class="btn btn-info delete" onclick="del('7')" style="margin-bottom: 0px;padding: 0px 12px;">删除</button>
                                    </td>
                                </tr>
                                
                                
                                
                                
                                
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/jquery.jeditable.js"></script>
    <!-- Data Tables -->
    <script src="js/jquery.dataTables.js"></script>
    <script src="js/dataTables.bootstrap.js"></script>
    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>
    <!-- Page-Level Scripts -->
    <!-- Sweet alert -->
    <script src="js/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    function del(id) {
		if(confirm("确定删除吗？删除后将无法恢复！")){
			window.location.href="admin_bumen_del.action?bumen.id="+id;
			return true;
		}else{
			return false;
		}
	};
        $(document).ready(function () {
        	
            $('.dataTables-example').dataTable();

            /* Init DataTables */
            var oTable = $('#editable').dataTable();

            /* Apply the jEditable handlers to the table */
            oTable.$('td').editable('../example_ajax.php', {
                "callback": function (sValue, y) {
                    var aPos = oTable.fnGetPosition(this);
                    oTable.fnUpdate(sValue, aPos[0], aPos[1]);
                },
                "submitdata": function (value, settings) {
                    return {
                        "row_id": this.parentNode.getAttribute('id'),
                        "column": oTable.fnGetPosition(this)[2]
                    };
                },

                "width": "90%",
                "height": "100%"
            });
        });

        function fnClickAddRow() {
            $('#editable').dataTable().fnAddData([
                "Custom row",
                "New row",
                "New row",
                "New row",
                "New row"]);

        }
    </script>
</body>
</html>
